<template>
  <div></div>
</template>
<script>
export default {
  data() {
    return {
      message: 'Hello World'
    }
  },
  created() {
    this.sayHello();
  },
  methods: {
    sayHello() {
      this.$api(`/home/homeList?id=${1}`).then((result) => {
        console.log(result);
        let home = {
          id: 1,
          title: 200
        }
        this.$api.post("/home/homeUpdate", home, {
          //这里设置了就不用api.js第17行设置了
          headers: {
            'Content-Type': 'multipart/form-data',
            tkoen:"123123123"
          }
        }).then((result) => {
          console.log(result);
        })
      })
    }
  }
}
</script>
<style></style>